#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	int sum=0,maxs=-1,mins=105,x;
	for(int i=1;i<=10;i++){
		cin>>x;
		sum+=x;
		if(x>maxs) maxs=x;
		if(x<mins) mins=x;
	}
	printf("%.3f",(sum-maxs-mins)/8.0);
	return 0;
}
